import axios from "@/common/axios";
import { API_URL } from "@/common/constants";

export const queryKnowShareList = async (json) => {
  let { data } = await axios.post(API_URL + "rKnowShareApi/queryKnowShareList", json);
  return data;
};

export const updateAudit = async (json) => {
  let { data } = await axios.post(API_URL + "rKnowShareApi/updateAudit", json);
  return data;
};


export const updateKnowShare = async (json) => {
  let { data } = await axios.post(API_URL + "rKnowShareApi/updateKnowShare", json);
  return data;
};


export const addKnowShare = async (json) => {
  let { data } = await axios.post(API_URL + "rKnowShareApi/addKnowShare", json);
  return data;
};



export const delKnowShare = async (json) => {
  let { data } = await axios.post(API_URL + "rKnowShareApi/delKnowShare", json);
  return data;
};


export const importExcel = async (formData) => {
  let { data } = await axios.post(API_URL + "rKnowShareApi/importExcel", formData, {
    headers: {
      'Content-Type': 'multipart/form-data;charset=utf-8'
    }
  });
  return data;

}


export const uploadFile = async (formData) => {
  let { data } = await axios.post(API_URL + "rKnowShareApi/uploadFile", formData, {
    headers: {
      'Content-Type': 'multipart/form-data;charset=utf-8'
    }
  });
  return data;
}

export const uploadThumb = async (formData) => {
  let { data } = await axios.post(API_URL + "rKnowShareApi/uploadThumb", formData, {
    headers: {
      'Content-Type': 'multipart/form-data;charset=utf-8'
    }
  });
  return data;
}


